/*
 * Copyright (c) 2011 Ball State University
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * NOTE:
 * Derivative work based on the Google IO 2011 Schedule app released for open source
 * http://code.google.com/p/iosched/
 */

package edu.bsu.android.gtv.apps.bconnected.util;

import edu.bsu.android.gtv.apps.bconnected.R;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;

/**
 * A helper for showing the about dialog box
 */
public class AboutHelper {
	
    /**
     * Show Help/About information for the application
     * @param activity Activity started from.
     */
    public static void showAbout(final Activity activity) {
        AlertDialog.Builder builder = new AlertDialog.Builder(activity)
                .setTitle(R.string.dialog_about)
                .setMessage(activity.getString(R.string.content_about));

        // Show OK to dismiss the about screen
        builder.setPositiveButton(android.R.string.ok,
                new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                    }
                });
        
        AlertDialog about = builder.create();
        about.show();
    }
}
